/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.gob.mh.dgii.model;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author TI TECNOLOGIA
 */
@Embeddable
public class DeRucPerOpcCamPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_PERFIL")
    private BigInteger idPerfil;
    @Basic(optional = false)
    @Column(name = "ID_OPCION")
    private BigInteger idOpcion;
    @Basic(optional = false)
    @Column(name = "ID_CAMPO")
    private BigInteger idCampo;

    public DeRucPerOpcCamPK() {
    }

    public DeRucPerOpcCamPK(BigInteger idPerfil, BigInteger idOpcion, BigInteger idCampo) {
        this.idPerfil = idPerfil;
        this.idOpcion = idOpcion;
        this.idCampo = idCampo;
    }

    public BigInteger getIdPerfil() {
        return idPerfil;
    }

    public void setIdPerfil(BigInteger idPerfil) {
        this.idPerfil = idPerfil;
    }

    public BigInteger getIdOpcion() {
        return idOpcion;
    }

    public void setIdOpcion(BigInteger idOpcion) {
        this.idOpcion = idOpcion;
    }

    public BigInteger getIdCampo() {
        return idCampo;
    }

    public void setIdCampo(BigInteger idCampo) {
        this.idCampo = idCampo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPerfil != null ? idPerfil.hashCode() : 0);
        hash += (idOpcion != null ? idOpcion.hashCode() : 0);
        hash += (idCampo != null ? idCampo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DeRucPerOpcCamPK)) {
            return false;
        }
        DeRucPerOpcCamPK other = (DeRucPerOpcCamPK) object;
        if ((this.idPerfil == null && other.idPerfil != null) || (this.idPerfil != null && !this.idPerfil.equals(other.idPerfil))) {
            return false;
        }
        if ((this.idOpcion == null && other.idOpcion != null) || (this.idOpcion != null && !this.idOpcion.equals(other.idOpcion))) {
            return false;
        }
        if ((this.idCampo == null && other.idCampo != null) || (this.idCampo != null && !this.idCampo.equals(other.idCampo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.DeRucPerOpcCamPK[ idPerfil=" + idPerfil + ", idOpcion=" + idOpcion + ", idCampo=" + idCampo + " ]";
    }
    
}
